package com.lei.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lei.dao.UserDao;
import com.lei.pojo.User;


@Service
@Transactional
public class UserService {
	
	private UserDao userDao;

	@Transactional(readOnly=true)
	public User findByUsernameAndPassword(User user){
		return userDao.findByUsernameAndPassword(user);
	}
	
	
	@Autowired
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
	

}
